//
//  ThreadViewsController.h
//  ViewPoint
//
//  Created by Demiao Lin on 09-2-22.
//  Copyright 2009 Tsinghua. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "NewSMTH.h"

@class Board;
@class Setting;
@class NewSMTH;

@interface ThreadViewController : UIViewController {
	Board *board;
    NSInteger *thread_id;
	NSInteger *post_id;
	NSInteger disappear;
    
	UIView *contentView;
	UIWebView *webView;
    UIActivityIndicatorView *activityIndicator;
	
    NewSMTH *smth;
	
	Setting *settings;
	
}

@property (nonatomic, retain) Board *board;
@property (nonatomic) NSInteger *thread_id;
@property (nonatomic) NSInteger *post_id;
@property (nonatomic) NSInteger disappear;

@property (nonatomic, retain) UIView *contentView;
@property (nonatomic, retain) UIWebView *webView;

-(void) setThreadViewWithTitle:(NSString*)title 
					     board:(Board*)b 
				     thread_id:(NSInteger*)tid
					   post_id:(NSInteger*)pid;
- (void) setViewsRotation;

-(void) loadPostViewData:(id)object;
-(void) loadPostViewAsynchronously;

-(void) loadFollowingPosts;

-(void) toggleToolbarAndNavBar;
-(void) hideToolbarAndNavBar;

- (void) startAnimating;
- (void) stopAnimating;

@end


@interface ThreadTransparentView : UIView {
    ThreadViewController *controller;
	NSInteger touchType;
}

@property (nonatomic, retain) ThreadViewController *controller;
@property (nonatomic) NSInteger touchType;

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;

//- (void) didMoveToSuperview;

@end